package com.ruoyi.chat.domain;

import java.util.Date;

public class ChatMessage {
    private Long from;
    private Long to;

    private String message;
    private Date time;

    // Getters and Setters
    public Long getTo() {
        return to;
    }

    public void setTo(Long to) {
        this.to = to;
    }

    public Long getFrom() {
        return from;
    }

    public void setFrom(Long from) {
        this.from = from;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    @Override
    public String toString() {
        return "ChatMessage{" +
                "toId=" + to +
                ", fromId=" + from +
                ", message='" + message + '\'' +
                ", sentAt=" + time +
                '}';
    }
}
